/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cdparanoya;

import CdController.CdJpaController;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.swing.table.AbstractTableModel;

/**
 *
 * @author guest
 */
public class CdTableDataTable extends AbstractTableModel {

    private EntityManager manager;

    public CdTableDataTable( EntityManager manager ) {
        this.manager = manager;
    }

    public void search( String name , String description ) {
        Query query = manager.createQuery( "select c from Cd c");

        List list = query.getResultList();


    }


    public Object getValueAt(int rowIndex, int columnIndex) {
        return null;
    }

    public int getRowCount() {
        return 0;
    }

    public int getColumnCount() {
        return 4;
    }


    public static void main(String[] argv) {

        CdJpaController controller = new CdJpaController();
        CdTableDataTable table = new CdTableDataTable( controller.getEntityManager() );
        table.search( "test", "test");

    }


}
